package com.freewater.parking.domain.blacklist;

import com.freewater.parking.domain.common.PlateNumber;
import com.freewater.parking.domain.common.BaseAggregateRoot;
import org.apache.commons.lang3.Validate;

import java.io.Serializable;

public class BlackList extends BaseAggregateRoot {
    /**
     * 车牌号
     */
    private final PlateNumber plateNumber;

    public BlackList(PlateNumber plateNumber) {
        Validate.notNull(plateNumber, "车牌号不能为空");
        this.plateNumber = plateNumber;
    }

    @Override
    public Serializable getId() {
        return this.plateNumber;
    }

    /**
     * 获取车牌号
     *
     * @return 车牌号
     */
    public PlateNumber getPlateNumber() {
        return plateNumber;
    }
}
